//
//  YJEmotionTabBarBtn.m
//  YJB
//
//  Created by YJB on 2017/2/17.
//  Copyright © 2017年 YJB. All rights reserved.
//

#import "YJEmotionTabBarBtn.h"

@implementation YJEmotionTabBarBtn
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        self.adjustsImageWhenDisabled = NO;
        self.adjustsImageWhenHighlighted = NO;
        [self setBackgroundImage:[UIImage imageNamed:@"emotionTabBar_btnBg_icon"] forState:UIControlStateDisabled];
    }
    return self;
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    self.imageView.width = 27;
    self.imageView.height = 27;
    self.imageView.x = 0.5 * (self.width - self.imageView.width);
    self.imageView.y = 0.5 * (self.height - self.imageView.height);
}

@end
